package com.mdxx.xczd.utils;

import java.lang.reflect.Method;

/**
 * Created by MD-02 on 2017/4/20.
 */

public class SystemPropertiesInvoke {
    public static  String getProperty(String key) {
        String value = "unknown";
        try {
            Class<?> c = Class.forName("android.os.SystemProperties");
            Method get = c.getMethod("get", String.class);
            value = (String)(get.invoke(c, key));
        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            /*value = value.substring(0,21);*/
            return value.trim();
        }
    }
}